package com.example.demo.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.demo.entity.TbUser;
import com.example.demo.service.TbUserService;
import com.example.demo.util.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;

/**
 * (TbUser)表控制层
 *
 * @author makejava
 * @since 2022-03-27 17:16:35
 */
@RestController
@RequestMapping("tbUser")
@Api(tags = "user相关接口")
public class TbUserController {
    /**
     * 服务对象
     */
    @Autowired
    private TbUserService tbUserService;

    /**
     * 分页查询所有数据
     *
     * @param page   分页对象
     * @param tbUser 查询实体
     * @return 所有数据
     */
    @GetMapping
    @ApiOperation(value = "分页查询所有数据",httpMethod = "GET")
    public String selectAll(Page<TbUser> page, TbUser tbUser) {
        return null;
    }

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("{id}")
    @ApiOperation(value = "通过主键查询单条数据",httpMethod = "GET")
    public String selectOne(@PathVariable Serializable id) {
        return null;
    }

    /**
     * 新增数据
     *
     * @param tbUser 实体对象
     * @return 新增结果
     */
    @PostMapping
    @ApiOperation(value = "新增数据",httpMethod = "POST")
    public String insert(@RequestBody TbUser tbUser) {
        return null;
    }

    /**
     * 修改数据
     *
     * @param tbUser 实体对象
     * @return 修改结果
     */
    @PostMapping
    @ApiOperation(value = "修改数据",httpMethod = "POST")
    public String update(@RequestBody TbUser tbUser) {
        return null;
    }

    /**
     * 删除数据
     *
     * @param idList 主键结合
     * @return 删除结果
     */
    @PostMapping
    @ApiOperation(value = "删除数据",httpMethod = "POST")
    public String delete(@RequestParam("idList") List<Long> idList) {
        return null;
    }
}

